package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author stone
 * @date 2022/06/21 14:34
 */
//@Controller//("jsonController")
//@ResponseBody
@RestController
public class JsonController {

    @RequestMapping("json")
    //@ResponseBody
    public User json() {
        return new User("松哥","牛皮");
    }


    @RequestMapping("json2")
    public BaseRespVo json2() {
        return BaseRespVo.ok(new User());
    }
}
